package com.bdqn.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.crm.pojo.SysRight;
import com.bdqn.crm.pojo.SysRole;

import java.util.List;

public interface SysRightMapper extends BaseMapper<SysRight> {
    /**
     * 根据角色查询权限
     * @param sysRole
     * @return
     */
    List<SysRight> findRightsByRolesOrderByRightCode(SysRole sysRole);

    /**
     * 查询所有权限
     * @return
     */
    public List<SysRight> findAllRights();

    /**
     * 根据角色查询权限
     * @param role
     * @return
     */
    public List<SysRight> findRightsByRole(SysRole role);
}
